<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/

//$app->get('/', function () use ($app) {
//    return $app->version();
//});

$app->get('/', 'UserController@login');
$app->post('/register', 'UserController@register');
$app->get('/index', 'UserController@index');
$app->get('/search', 'UserController@search');
$app->get('/main', 'UserController@main');
$app->get('/recharge', 'UserController@recharge');
$app->post('/recharge', 'UserController@recharge');
$app->post('/postRecharge', 'UserController@postRecharge');
$app->post('/getSearchList', 'UserController@getSearchList');


//管理员
$app->get('/admin', 'AdminController@login');
$app->get('/admin/index', 'AdminController@index');
$app->post('/admin/register', 'AdminController@register');
$app->get('/admin/user', 'AdminController@user');
$app->get('/admin/userAdd', 'AdminController@userAdd');
$app->get('/admin/waterList', 'AdminController@waterList');